package com.tdkj.service.common;

import java.util.List;

import com.tdkj.model.common.BeanType;
import com.tdkj.service.IBaseService;

public interface IBeanTypeService extends IBaseService{
	
	class Constants{
		public static final Integer ROOT_LEVEL = 0;
		public static final String ROOT_NAME_OF_SHOP = "SHOP_ROOT";
		public static final String ROOT_NAME_OF_GOOD = "GOOD_ROOT";
		public static final String ROOT_NAME_OF_SUPPLY_AND_DEMAND = "SUPPLY_AND_DEMAND_ROOT";
		
		public static final String getShopGoodTypeRoot(Long userId){
			return ROOT_NAME_OF_GOOD + "_" + userId;
		}
	}
	
	BeanType getRoot(String rootName);
	
	BeanType getRootRecursive(String rootName);
	
	BeanType createType(long parentId, String name);
	
	void updateType(long id, long parentId, String name);
	
	void deleteType(long id);
	
	List<BeanType> getTypesByLevel(String rootName, Integer level);
	
}
